function formatTime(date) {
    let new_date = new Date(date);
    const year = new_date.getFullYear();
    const month = (new_date.getMonth() + 1).toString().padStart(2, '0');
    const day = new_date.getDate().toString().padStart(2, '0');
    const hours = new_date.getHours().toString().padStart(2, '0');
    const minutes = new_date.getMinutes().toString().padStart(2, '0');
    const seconds = new_date.getSeconds().toString().padStart(2, '0');
  
    return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  }

  export default formatTime;